package it.codelair.getter;

import java.util.Date;

public class Sms {

	public static final int INBOX_TYPE=1;
	public static final int OUTGOING_TYPE=2;
	public static final int OTHER_TYPE=3;
	private String number;
	private int type;
	private String body;
	private Date date;
	
	public Sms(String number,String body,String type, String date){
		this.number=number;
		this.body=body;
		if(Integer.parseInt(type)!=Sms.INBOX_TYPE && Integer.parseInt(type)!=Sms.OUTGOING_TYPE){
			this.type=Sms.OTHER_TYPE;
		}
		else
			this.type=Integer.parseInt(type);
		this.date=new Date(Long.parseLong(date));
		
	}

	public String getNumber() {
		return number;
	}

	public int getType() {
		return type;
	}

	public String getBody() {
		return body;
	}

	public Date getDate() {
		return date;
	}
	
	
	
}
